package com.lemon.smartsafety.ui.widget;

import com.lemon.smartsafety.entity.common.IndexModel;

import java.util.Comparator;


public class PinyinComparator implements Comparator<IndexModel> {

    public int compare(IndexModel o1, IndexModel o2) {
        if (o1.getIndexCharI().equals("@") || o2.getIndexCharI().equals("#")) {
            return -1;
        } else if (o1.getIndexCharI().equals("#") || o2.getIndexCharI().equals("@")) {
            return 1;
        } else {
            return o1.getIndexCharI().compareTo(o2.getIndexCharI());
        }
    }

}